<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
       
    <meta name="viewport"        
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <title>推广二维码</title>
    <link rel="stylesheet" href="../public/css/footer.css">
    <link rel="stylesheet" href="../public/css/reset.css">
    <link rel="stylesheet" href="../public/css/all_use.css">
    <link rel="stylesheet" href="../public/css/yongjin.css">
    <script src="../public/js/utils/utils.js"></script>
    <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<style>
</style>

<body>
<div id="app">
    <main>
        <div>
            <div style="position: relative">
                <img :src="share.service" style="width: 100%;height: 100%;">
                <img :src="qrcode" style="    width: 120px;
    height: 120px;
    margin-left: 12%;
    z-index: 999;
    position: absolute;
    top: 60px;
    right: 100px;"/>
            </div>
        </div>
    </main>
</div>
</body>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script type="module">
    import ajax from "../public/js/api/api.js";

    var app = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!',
            index: 0,
            share:{},
            qrcode:'',
            text: '',
        },
        created() {
            this.findAfter();
            this.getQr();
        },
        methods:{
            findAfter(){
                ajax
                    .findAfter()
                    .then((res)=>{
                        this.share = res.data.data[1]
                    })
            },
            getQr(){
                ajax
                    .getQr()
                    .then((res)=>{
                        this.qrcode = "https://www.lofter.com/genBitmaxImage?url=http://coss1.fylac.com/api/user/invite?uniCode="+res.data.data+"&h=200&w=200";
                    })
            },
        }
    })
</script>

</html>